import { request } from '@api/service'

export const fetchList = (params) => {
  return request({
    url: '/ranking/index',
    method: 'get',
    params
  })
}

export const award = (params) => {
  return request({
    url: '/ranking/reward',
    method: 'post',
    params
  })
}

export const update = (params, data) => {
  return request({
    url: '/ranking/update',
    method: 'post',
    params,
    data
  })
}

export const getReward = (params) => {
  return request({
    url: '/ranking/get-reward',
    method: 'get',
    params
  })
}

export const setReward = (params, data) => {
  return request({
    url: '/ranking/set-reward',
    method: 'post',
    params,
    data
  })
}
